package output;

import java.util.ArrayList;

public final class OutputResConfig
{
    public ArrayList<OutputResQueueNode> queueList;

    public OutputResConfig()
    {
        this.queueList = new ArrayList<OutputResQueueNode>();
    }

    public OutputResQueueNode getOrCreateQueueNodeByName(String _queueName)
    {
        for (OutputResQueueNode queueNode : queueList)
        {
            if (queueNode.queueName.equals(_queueName))
            {
                return queueNode;
            }
        }

        OutputResQueueNode newQueueNode = new OutputResQueueNode();
        newQueueNode.queueName = _queueName;
        newQueueNode.fileList = new ArrayList<OutputResFileNode>();
        queueList.add(newQueueNode);
        return newQueueNode;
    }

}
